package com.how2java.action;

import java.util.List;

import com.how2java.pojo.Product;
import com.how2java.service.interfaces.IProductService;

public class ProductAction {
	IProductService IProductService;
	List<Product> products;

	public String list() {
		products = IProductService.list();
		return "listJsp";
	}
	
	public String index() {
		return "indexJsp";
	}
	
	public String add() {
		
		return "addJsp";
	}
	
	public String delete() {
		System.out.println(IProductService.delete());
		return "deleteJsp";
	}
	
	public String update() {
		return "updateJsp";
	}

	public IProductService getProductService() {
		return IProductService;
	}

	public void setProductService(IProductService productService) {
		this.IProductService = productService;
	}

	public List<Product> getProducts() {
		return products;
	}

	public void setProducts(List<Product> products) {
		this.products = products;
	}
}
